package com.adkfp.service.impl;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.adkfp.bean.ADKUserInfoBean;
import com.adkfp.dao.ADKUserInfoDaoMapper;
import com.adkfp.service.IADKUserInfoService;

/**
 * class name:ADKUserInfoService实现类 <BR>
 * class description: ADKUserInfo表的增删改查 <BR>
 * Remark: <BR>
 * @version 1.00 2019年01月03日
 * @author JACK)jackwei
 */
@Service("aDKUserInfoService")
public class ADKUserInfoServiceImpl implements IADKUserInfoService {
	@Resource
	private ADKUserInfoDaoMapper aDKUserInfoMapper;

	/**
	 * @Override
	 * Method name: insert <BR>
	 * Description: 插入一条记录 <BR>
	 * Remark: <BR>
	 * @param bean  <BR>
	*/
	@Override
	@Transactional
	public void insert(ADKUserInfoBean bean) {
		aDKUserInfoMapper.insert(bean);
	}

	/**
	 * @Override
	 * Method name: delete <BR>
	 * Description: 删除一条记录 <BR>
	 * Remark: <BR>
	 * @param id  <BR>
	*/
	@Override
	@Transactional
	public void delete(Integer id) {
		aDKUserInfoMapper.delete(id);
	}

	/**
	 * @Override
	 * Method name: update <BR>
	 * Description: 更新一条记录 <BR>
	 * Remark: <BR>
	 * @param bean  <BR>
	*/
	@Override
	@Transactional
	public void update(ADKUserInfoBean bean) {
		aDKUserInfoMapper.update(bean);
	}

	/**
	 * @Override
	 * Method name: findById <BR>
	 * Description: 根据id获取一条记录 <BR>
	 * Remark: <BR>
	 * @param id
	 * @return  <BR>
	*/
	@Override
	public ADKUserInfoBean findById(Integer id) {
		return aDKUserInfoMapper.findById(id);
	}

	/**
	 * @Override
	 * Method name: findByCondition <BR>
	 * Description: 根据bean里面的条件(判空)查询所有记录 <BR>
	 * Remark: <BR>
	 * @param bean
	 * @return  <BR>
	*/
	@Override
	@Transactional
	public List<ADKUserInfoBean> findByCondition(ADKUserInfoBean bean) {
		return aDKUserInfoMapper.findByCondition(bean);
	}

	/**
	 * @Override
	 * Method name: findByConditionCount <BR>
	 * Description: 根据bean里面的条件(判空)查询所有记录条数 <BR>
	 * Remark: <BR>
	 * @param bean
	 * @return  <BR>
	*/
	@Override
	@Transactional
	public long findByConditionCount(ADKUserInfoBean bean) {
		return aDKUserInfoMapper.findByConditionCount(bean);
	}

	@Override
	public List<ADKUserInfoBean> afindByCondition(ADKUserInfoBean bean) {
		return aDKUserInfoMapper.afindByCondition(bean);
	}
	//通过autoid查找userid
	@Override
	@Transactional
	public ADKUserInfoBean finduseridById(String autoid) {
		
		return aDKUserInfoMapper.finduseridById(autoid);
	}

	@Override
	public long afindByConditionCount(ADKUserInfoBean bean) {
		return aDKUserInfoMapper.afindByConditionCount(bean);
	}
	
	//用于权限组
	@Override
	@Transactional
	public List<ADKUserInfoBean> pfindByCondition(ADKUserInfoBean bean) {
		
		return aDKUserInfoMapper.pfindByCondition(bean);
	}

	@Override
	@Transactional
	public long pfindByConditionCount(ADKUserInfoBean bean) {
		// TODO Auto-generated method stub
		return aDKUserInfoMapper.pfindByConditionCount(bean);
	}

	
	//用于人员权限的模糊查询
	@Override
	@Transactional
	public List<ADKUserInfoBean> cfindByCondition(ADKUserInfoBean bean) {
		
		return aDKUserInfoMapper.cfindByCondition(bean);
	}
	@Override
	@Transactional
	public long cfindByConditionCount(ADKUserInfoBean bean) {
		// TODO Auto-generated method stub
		return aDKUserInfoMapper.cfindByConditionCount(bean);
	}
	
	
	//用于权限组-人员的增加人员
	@Override
	@Transactional
	public List<ADKUserInfoBean> ufindByCondition(ADKUserInfoBean bean) {
		// TODO Auto-generated method stub
		return aDKUserInfoMapper.ufindByCondition(bean);
	}

	@Override
	@Transactional
	public long ufindByConditionCount(ADKUserInfoBean bean) {
		// TODO Auto-generated method stub
		return aDKUserInfoMapper.ufindByConditionCount(bean);
	}

	//验证名称唯一(FMY)
	@Override
	public long checkSname(ADKUserInfoBean bean) {
		return aDKUserInfoMapper.checkSname(bean);
	}
}